package com.atstudying.mall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 使用RabbitMQ
 * 1：引入amqp场景：RabbitAutoConfiguration就会自动生效
 * 2：RabbitAutoConfiguration就会自动生效给容器中自动配置了
 * CachingConnectionFactory  RabbitTemplateConfigurer  RabbitTemplate RabbitMessagingTemplate amqpAdmin
 * // @Bean
 public CachingConnectionFactory rabbitConnectionFactory(RabbitProperties properties,代码可以知道我们要去application.yml种进行配置
所有的属性都是在下面的类中绑定
 @ConfigurationProperties(prefix = "spring.rabbitmq")
 public class RabbitProperties {
 3：给配置文件中配置spring.rabbitmq信息
 *  4：@EnableRabbit :这种注解用到了非常多开启相关功能
 *  5：监听消息@RabbitListener 必须开启@EnableRabbit
 *  @RabbitListener：类+方法上
 *  @RabbitHandler：标在方法上
 *  @
 */
@EnableRedisHttpSession //整合redis作为session存储
@EnableFeignClients
@EnableRabbit
@EnableDiscoveryClient
@SpringBootApplication
@MapperScan("com.atstudying.mall.order.dao")
public class MallOrderApplication {

	public static void main(String[] args) {
		SpringApplication.run(MallOrderApplication.class, args);
	}

}
